package com.gwd.task.model;


/**
 * @author zhiyongming
 * @date 2020/11/9 17:04
 */
public enum CodeAndMsg {
    SUCCESS(200, "调用成功"),
    METHOD_FAIL(400, "接口报错"),
    Unauthorized(401, "账号密码错误"),
    SERVER_ERROR(500, "服务错误"),
    UN_KNOW_EXCEPTION(3000, "未知错误"),
    DATA_ERROR(20000, "数据操作");

    private int code;
    private String msg;

    CodeAndMsg(int code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}